home *** CD-ROM | disk | FTP | other *** search
- 100 rem snake v1.0 * completed 9/90 * edited 9/6/91 by david caruso ii
- 110 poke53265,11:dv=peek(186):ifdv<8thendv=8
- 120 a=2:f4=3
- 130 poke53272,24:gosub1020
- 140 poke54272,0:v=54276:t=54273:poke54296,15:a=rnd(ti)
- 150 c=1:sc=0:f=0:p=0:o=0:poke53280,14:poke53281,0:c5=0:mo=0:ys=0:hx=0:lh=0:sp=bs
- 160 bo=0:bn=int(rnd(1)*200)+400
- 170 poke53265,11:gosub1780:poke53265,27
- 180 goto1070
- 190 gosub200:goto350
- 200 poke53280,14
- 210 poke53265,11:print"[154][147] \snake\ score [211] [255] [146]";:gosub1270
- 220 a=f:gosub1010:ifa=0thenb$=" "
- 230 print"";b$;"[146]";:pokev,17:di=0
- 240 forg=1to23:print" [146] [146]";:poket,g*2
- 250 next:pokev,16
- 260 print" [146]":poke2023,160:poke53265,27
- 270 hb=int(rnd(1)*3)+5
- 280 cs=7:return
- 290 ifk=-1ork=1thena=67:goto310
- 300 a=66
- 310 sc=sc+1:e=e+1:ife>uthengosub1530
- 320 return
- 330 gosub2220:sh=3:ly=int(l/40):lx=l-(ly*40):sp=sp-6:poke1054,160:poke1058,160
- 340 mf=f:mp=o:f=0:o=0:poke1058,160:goto450
- 350 a=int(rnd(1)*20)+11:g=int(rnd(1)*9)+8:l=(g*40)+a
- 360 a=int(rnd(1)*4)+1:k=1:ifa=2thenk=-1
- 370 ifa=3thenk=40
- 380 ifa=4thenk=-40
- 390 gosub890
- 400 ifsh=0thensc=sc+1:ex=ex+1:poke1024+l,87:poke55296+l,5:e=e+1:ife>uthengosub1530
- 410 ifdi=1thengosub1680
- 420 ifmo=1thengosub2300:ifc5=1then1370
- 430 bo=bo+1:ifbo>bnthengosub1550
- 440 iflh>1thenlh=lh-1:iflh=1then330
- 450 iflh=1thengosub290:poke55296+l,c:poke1024+l,a:gosub2150
- 460 ifp>0thenpokev,17:poket,p:forg=1to1:next:pokev,16
- 470 a=sc:gosub1010:print"[154]";b$:goto490
- 480 pokev,17:poket,47:forg=1to1:next:pokev,16:return
- 490 forg=1tosp:next:geta$:ifa$=""then610
- 500 if(a$="k"ora$="")andk<>40andk<>-40thenk=40:gosub480:jd=1:goto620
- 510 if(a$="i"ora$="[145]")andk<>-40andk<>40thenk=-40:gosub480:jd=1:goto620
- 520 if(a$="l"ora$="")andk<>1andk<>-1thenk=1:gosub480:jd=1:goto620
- 530 ifa$="s"thengosub1510
- 540 if(a$="j"ora$="[157]")andk<>-1andk<>1thenk=-1:gosub480:jd=1:goto620
- 550 ifcs=7anda$=" "then490
- 560 ifa$=" "andf>0thenpoke53265,11:gosub2480:mo=0:gosub2250:gosub200:goto620
- 570 if(a$="u"ora$=chr$(13))ando>0ora$="p"ando>0thenp=40:o=o-1:gosub1270:goto620
- 580 ifa$="-"thensp=sp+2:bs=bs+2:goto620
- 590 ifa$=chr$(3)thengosub1350
- 600 ifa$="+"thengosub720
- 610 cs=0:jy=peek(56320)or128:ifjy<>255then2080
- 620 gosub830
- 630 h=peek(k+l+1024):ifh<>32then750
- 640 ifp=0then660
- 650 p=p-1:c=int(p/3)+2
- 660 poke55296+l,c:poke1024+l,de:ifp=0thenc=1:nh=0
- 670 ifsh=7then1370
- 680 k2=k:l=l+k:fs=fs+1:iffs=30thenfs=0:gosub920
- 690 ifpeek(k+l+1024)=87thensp=sp+6:gf=1
- 700 w=w+1:ifw>hbthen1310
- 710 goto400
- 720 sp=sp-2:ifsp<0thensp=0
- 730 bs=bs-2:ifbs<0thenbs=0
- 740 return
- 750 ifh=83thenpoke53280,1:sc=sc+25:goto960
- 760 ifh=90andp=0andlh<>1then1650
- 770 ifh>128andh<192then910
- 780 ifh=94thenpoke53280,1:sc=sc+25:goto1240
- 790 ifh=87thensh=0:sp=sp+6:lh=0:gosub2230:goto660
- 800 ifp>0then650
- 810 ifh=90andlh=1then660
- 820 sh=7:goto660
- 830 ifjd=3thenreturn
- 840 ifjd=2then890
- 850 jd=2:ifk=1andk2=40ork=-40andk2=-1thende=109:return
- 860 ifk=40andk2=-1ork=1andk2=-40thende=112:return
- 870 ifk=-1andk2=40ork=-40andk2=1thende=125:return
- 880 de=110:return
- 890 jd=3:ifk=-40ork=40thende=66:return
- 900 de=67:return
- 910 sh=7:goto660
- 920 forg=1to2:pokev,17:poket,20:forh=1to10:next:pokev,16:forh=1to35:next:next
- 930 a=int(rnd(1)*10)+1:ifa>5then1160
- 940 a=int(rnd(1)*917)+42:ifpeek(1024+a)=160then920
- 950 poke55296+a,10:poke1024+a,83:return
- 960 pokev,33:poket,10:forg=1to15:next:pokev,32
- 970 iff=1then990
- 980 f=f+1:a=f:gosub1010:print"";b$
- 990 poke53280,14:iflh=1thena$=" ":goto560
- 1000 goto660
- 1010 b$=str$(a):b$=right$(b$,len(b$)-1):return
- 1020 f4=5:a=rnd(ti):close8:open15,dv,15:open8,dv,8,"snake file,s,r"
- 1025 input#8,hs,bs,na$:input#15,a$:close8:f4=0
- 1030 forg=54272to54296:pokeg,0:next:poke54277,30:poke54278,0:so=1
- 1040 iflen(na$)=0thenna$="john galt"
- 1050 ifbs<1thenbs=70
- 1060 return
- 1070 geta$:ifa$=""then1070
- 1080 ifa$="q"then1110
- 1090 ifa$="[200]"then1180
- 1100 goto190
- 1110 printc$;"[145][145][145][145][145][145][145][157][157][157][157][157][157][157][157][157][157][157][157] sure? (y/n)"
- 1120 geta$:ifa$<>"y"anda$<>"n"then1120
- 1130 ifa$="y"then2570
- 1140 printc$;"[145][145][145][145][145][145][145][157][157][157][157][157][157][157][157][157][157][157][157] ";
- 1150 gosub2050:goto1070
- 1160 a=int(rnd(1)*917)+42:ifpeek(1024+a)=160then1160
- 1170 poke55296+a,7:poke1024+a,94:return
- 1180 rem clear high score
- 1190 printc$;"[158] \\\ clearing \\\ ";
- 1200 close15:open15,dv,15:print#15,"s0:snake file":close15
- 1210 bs=70:hs=100:na$="john galt"
- 1220 close8:open8,dv,8,"snake file,s,w":print#8,hs:print#8,bs:print#8,na$:close8
- 1230 gosub2000:goto1070
- 1240 pokev,33:poket,30:forg=1to15:next:pokev,32
- 1250 ifo=3then1290
- 1260 o=o+1:gosub1270:goto1290
- 1270 a=o:gosub1010:ifa=0thenb$=" "
- 1280 print"";b$:return
- 1290 poke53280,14:iflh=1thenpoke198,1:poke631,47
- 1300 goto660
- 1310 a=int(rnd(1)*917)+42:ifpeek(1024+a)<>32andck<5thenck=ck+1:goto1310
- 1320 forg=1to4:ifa=(k*g)+lthenpoke64,206:goto1310
- 1330 next:ck=0:pokev,17:poket,11:forg=1to10:next:pokev,16
- 1340 poke1024+a,214:poke55296+a,15:w=0:goto400
- 1350 geta$:ifa$=""then1350
- 1360 return
- 1370 poke53280,2:pokev,129:forg=100to20step-1:poket,g:next:forg=1to10:next:sh=0
- 1380 a=hx:gosub1010:a$="bonus \"+b$:sc=sc+hx
- 1390 a=sc:gosub1010:a$=a$+"\ final score \"+b$+"\"
- 1400 b$=" ":print"[154]";b$
- 1410 a$=left$(b$,20-int(len(a$)/2))+a$:print"";a$
- 1420 pokev,128:poket,0:poke54272,0:poke198,0:ifsc>hsthenhs=sc:goto1460
- 1430 print"[154] (press a key) [146]"
- 1440 geta$:ifa$=""then1440
- 1450 goto150
- 1460 a$="?":print" high score! your name: [157][157][157][157][157][157][157][157][157][157][157]";
- 1470 gosub1700:na$=m$
- 1480 close15:open15,dv,15:print#15,"s0:snake file":close15
- 1490 close8:open8,dv,8,"snake file,s,w":print#8,hs:print#8,bs:print#8,na$:close8
- 1500 goto1430
- 1510 ifso=1thenpoke54296,0:so=0:return
- 1520 so=1:poke54296,15:return
- 1530 hb=hb-1:e=0:u=int(rnd(1)*30)+90:ifhb<2thenhb=2
- 1540 return
- 1550 bn=int(rnd(1)*200)+400:bo=0
- 1560 a=int(rnd(1)*3)+1:ifa<>2thenreturn
- 1570 a=int(rnd(1)*1000)+1:ifpeek(1024+a)=32then1600
- 1580 cr=cr+1:ifcr=6thenreturn
- 1590 goto1570
- 1600 cr=0:sl=a:poke1024+a,90:poke55296+a,3:di=1
- 1610 pokev,17:forg=80to190:poket,g:next:pokev,16:return
- 1620 iff4=5thenhs=100:na$="john galt":sp=70:close8:f4=0:gosub1030:goto140
- 1630 iff4=3thengosub1020:goto140
- 1640 poke53280,0:poke53265,11:forg=1to2000:next:poke186,dv:run
- 1650 a=53280:pokea,11:sc=sc+500:pokev,17:forg=20to90:poket,g:next:pokea,12:di=0
- 1660 forg=90to60step-1:poket,g:next:pokea,15
- 1670 forg=60to130:poket,g:next:pokev,16:pokea,14:goto660
- 1680 j=j+1:ifj=16thenj=1
- 1690 poke55296+sl,j:return
- 1700 m$="":m=0
- 1710 geta$:ifa$=""then1710
- 1720 a=asc(a$):ifa=32ora=46then1760
- 1730 ifa$=chr$(13)andm>0thenreturn
- 1740 ifa=20andm>0then1770
- 1750 ifa<65ora>90orm=11then1710
- 1760 m=m+1:m$=m$+a$:print"";a$;:goto1710
- 1770 m=m-1:m$=left$(m$,m):print"[157] [157]";:goto1710
- 1780 ws=1:poke53280,2:print"[158][147] s n a k e ";
- 1790 print" ";
- 1800 print" by david caruso ii ";
- 1810 print" ";
- 1820 print"[146][155]guide your snake between walls and"
- 1830 print"rocks. collect special items along"
- 1840 print"the way. use fire ([150][211][155]) to clear area."
- 1850 print"bonus is awarded for things burned.
- 1860 [153]"use power (sys(NULL)list) to pound through all"
- 1870 [153]"obstacles and collect items. do not"
- 1880 [153]"lose your mind while playing.":[153]"contfrefrefrefrefrefrefrefre"
- 1890 [153]" points wait def(NULL)cont..25 sys(NULL)cont..25 print(NULL)cont..500 openspc(cont..?":[153]"pospospospospospospospos"
- 1900 [153]" keys to use wait";
- 1910 [153]"pospospospospos pospospospospospospospospospospos"
- 1920 [153]" [i] wait listnorth [space] wait liststart fire"
- 1930 [153]" [k] wait listsouth [u] [p] wait listuse power"
- 1940 [153]" [j] wait listwest [stop] wait listpause"
- 1950 [153]" [l] wait listeast [+] [-] wait listalter speed"
- 1960 [153]" [q] wait listquit [shift-h] wait listclear high"
- 1970 [153]"usrusrusrusrusr usrusrusrusrusrusrusrusrusrusrusr"
- 1980 c$[178]""
- 1990 [153]c$;" current high score ";
- 2000 a$[178]" ":[151]198,0
- 2010 [153]c$;"sys";a$;:[151]2023,160
- 2020 a[178]hs:[141]1010:b$[178]b$[170]" by "[170]na$
- 2030 b$[178][200](a$,20[171][181]([195](b$)[173]2))[170]b$
- 2040 [153]c$;"sys";b$;
- 2050 [153]""
- 2060 [142]
- 2070 [151]v,17:[151]t,47:[129]g[178]1[164]1:[130]:[151]v,16:[142]
- 2080 [139]jy[178]254[175]k[179][177]40[175]k[179][177][171]40[167]k[178][171]40:[141]2070:jd[178]1:[137]620
- 2090 [139]jy[177]244[175]jy[179]248[175]k[179][177][171]1[175]k[179][177]1[167]k[178]1:[141]2070:jd[178]1:[137]620
- 2100 [139]jy[178]253[175]k[179][177][171]40[175]k[179][177]40[167]k[178]40:[141]2070:jd[178]1:[137]620
- 2110 [139]jy[177]248[175]jy[179]252[175]k[179][177]1[175]k[179][177][171]1[167]k[178][171]1:[141]2070:jd[178]1:[137]620
- 2120 [139]jy[178]239[167]a$[178]" ":[137]560
- 2130 [139]jy[179]239[167]a$[178]"/":[137]570
- 2140 [137]620
- 2150 [139]gf[178]1[167]sh[178]0:gf[178]0:lh[178]0:[141]2230:[142]
- 2160 [151]1024[170]lx[170](40[172]ly),32
- 2170 lx[178]lx[170]dx:[139][194](1024[170]lx[170](40[172]ly))[179][177]32[167]dx[178][171]dx:[141]2220:lx[178]lx[170]2[172]dx
- 2180 ly[178]ly[170]dy:[139][194](1024[170]lx[170](40[172]ly))[179][177]32[167]dy[178][171]dy:[141]2220:ly[178]ly[170]2[172]dy
- 2190 [139][194](1024[170]lx[170](40[172]ly))[179][177]32[167]2170
- 2200 [151]1024[170]lx[170](40[172]ly),87:[151]55296[170]lx[170](40[172]ly),5
- 2210 [142]
- 2220 [151]v,17:[151]t,29:[129]g[178]1[164]1:[130]:[151]v,16:[142]
- 2230 f[178]mf:o[178]mp:[141]1270:[139]f[178]1[167][151]1054,177
- 2240 [142]
- 2250 a1[178][181]([187](1)[172]100)[170]1:[139]a1[177]23[167][142]
- 2260 uh[178]0:mo[178]1:f[178]0:r2[178][181]([187](1)[172]21)[170]2:c2[178][181]([187](1)[172]38)[170]1
- 2270 g[178][181](l[173]40):a[178]l[171](g[172]40):[139][182](r2[171]g)[179]8[176][182](c2[171]a)[179]8[167]2260
- 2280 ws[178]ws[170].3:[139]ws[177]3[167]ws[178]3
- 2290 xd[178]ws:[142]
- 2300 [139]ys[178][181](xd)[167]ys[178]0:[142]
- 2310 ys[178]ys[170]1
- 2320 [139]lh[178]1[167]rs[178]ly:cs[178]lx:[137]2340
- 2330 rs[178][181](l[173]40):cs[178]l[171](rs[172]40)
- 2340 [151]1024[170](r2[172]40)[170]c2,32
- 2350 [139]r2[177]rs[167]r2[178]r2[171]1:[137]2370
- 2360 [139]r2[179]rs[167]r2[178]r2[170]1
- 2370 [139]c2[177]cs[167]c2[178]c2[171]1:[137]2390
- 2380 [139]c2[179]cs[167]c2[178]c2[170]1
- 2390 [151]v,33:[151]t,12:[129]g[178]1[164]5:[130]:[151]v,32
- 2400 a[178](r2[172]40)[170]c2:[139][194](1024[170]a)[179][177]32[167][151]1024[170]a,230:[141]2450:[137]2420
- 2410 [151]1024[170]a,102
- 2420 [151]55296[170]a,3
- 2430 [139]c2[178]cs[175]r2[178]rs[167]c5[178]1
- 2440 [142]
- 2450 uh[178]uh[170]1:[139]uh[178]40[167]xd[178]xd[170]1:uh[178]0
- 2460 [139]xd[177]4[167]xd[178]4
- 2470 [142]
- 2480 f[178]f[171]1:[139]mo[178]1[167]sc[178]sc[170](([181](ws)[171]1)[172]100)
- 2490 ex[178][181](ex[173]2):sc[178]sc[170]ex:[139]ex[177]hx[167]hx[178]ex
- 2500 [139]lh[177]0[167]2560
- 2510 a[178][181]([187](1)[172]100)[170]1:[139]a[177]22[167]2560
- 2520 lh[178][181]([187](1)[172]400)[170]50:a[178][181]([187](1)[172]4)[170]1:[139]a[178]1[167]dy[178][171]1:dx[178][171]1
- 2530 [139]a[178]2[167]dy[178][171]1:dx[178]1
- 2540 [139]a[178]3[167]dy[178]1:dx[178]1
- 2550 [139]a[178]4[167]dy[178]1:dx[178][171]1
- 2560 ex[178]0:[142]
- 2570 [143] ***** place routine here ****
- 2580 [143]
- 2590 [153]"loadsys
- 60000 close15:a$="hello connect":open15,8,15,"r0:"+a$+"="+a$:input#15,er:close15
- 60010 if er<>63 then print"[147]":end
- 60011 q$=chr$(34):poke646,peek(53281):print"[147]"
- 60020 print"load"q$a$q$",8"
- 60030 print"run":poke631,13:poke632,13:poke198,2:end
-